package cn.satoken.controller;

import cn.dev33.satoken.util.SaResult;
import cn.satoken.entity.SysRole;
import cn.satoken.service.SysRoleService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <h3>saToken</h3>
 * <p></p>
 *
 * @author gdw
 * @since 2025-05-28 11:09:24
 */
@RestController
@RequestMapping("/role")
@RequiredArgsConstructor
public class SysRoleController {
    private final SysRoleService sysRoleService;

    @GetMapping("/findAll")
    public SaResult findAll(){
        List<SysRole> list = sysRoleService.list();
        return SaResult.data(list);
    }
}
